package zzs.generalframework.gui.component.core.passwordfield;

import java.awt.Color;

import javax.swing.JPasswordField;

/**
 * @title
 * @description
 * @project zzs-gui-component
 * @package zzs.generalframework.gui.component.core.passwordfield
 * @author zzs
 * @date 2018年3月29日
 * @version 1.0
 */
public class JPasswordFieldExt extends JPasswordField
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8106992765530892098L;
	/**
	 * 是否必输
	 */
	private boolean isMust;

	public boolean isMust()
	{
		return isMust;
	}

	public void setMust(boolean isMust)
	{
		this.isMust = isMust;
		if (isMust)
		{
			setBackground(Color.YELLOW);
		}
	}

}
